#ifndef _IIC_H_
#define _IIC_H_

#include "stm32f10x.h"
#include "sys.h"
#include "delay.h"

#define IIC_GPIO_RCC RCC_APB2Periph_GPIOC
#define IIC_GPIO GPIOC
#define IIC_SCL_PIN GPIO_Pin_6
#define IIC_SDA_PIN GPIO_Pin_7

#define IIC_SCL PCout(6)
#define IIC_SDA PCout(7)
#define IIC_SDA_IN PCin(7)

void IIC_Pin_Init(void);

void IIC_Start(void);
void IIC_Stop(void);
void IIC_Send_Ack(u8 ack);
u8 IIC_Send_Data(u8 data);
u8 IIC_Read_Data(void);

#endif
